// pages/my/index.js
const app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    userInfo: null
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    
  },
  onShow:function(){     
    if (app.globalData.userInfo) {         
      this.setData({ userInfo: app.globalData.userInfo });
    }
  },
  toLogin:function(){
    console.log('a')
    app.check();
  },
  toStudent: function(res){
    wx.navigateTo({
      url: '/pages/mystudent/index',
    })
  },
  toMystudy: function(res){
    wx.switchTab({
      url: '/pages/mystudy/index',
    })
  },
  toMyphone: function (res) {
    wx.navigateTo({
      url: '/pages/myphone/index',
    })
  }
})